package com.ruoyi.gams.controller;

import com.alibaba.fastjson.JSONObject;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.gams.service.IGamsHomePageService;
import com.ruoyi.gams.vo.HomePageVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * 首页
 */
@Slf4j
@Api(tags = "首页")
@RestController
@RequestMapping("/gams/homepage")
public class GamsHomePageController
{

    @Autowired
    private IGamsHomePageService homePageService;

    @ApiOperation("评价信息统计")
    @ResponseBody
    @GetMapping("/get")
    public AjaxResult get()
    {
        HomePageVO vo = homePageService.getHomePage();
        return AjaxResult.success(vo);
    }

    @ApiOperation("排队信息统计")
    @ResponseBody
    @GetMapping("/queueCount")
    public AjaxResult queueCount()
    {
        JSONObject vo = homePageService.queueCount();
        return AjaxResult.success(vo);
    }


}
